package com.learn.dataandfile.sharedpreferences

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.preference.PreferenceManager
import android.view.LayoutInflater
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.exercise.struct.base.BaseActivity
import com.exercise.struct.ext.start
import com.exercise.struct.viewmodel.BaseViewModel
import com.learn.dataandfile.R
import com.learn.dataandfile.databinding.ActivitySharedPreferencesctivityBinding

class SharedPreferencesActivity : BaseActivity<BaseViewModel,ActivitySharedPreferencesctivityBinding>() {
    override val bindingInflater: (LayoutInflater) -> ActivitySharedPreferencesctivityBinding
        get() = ActivitySharedPreferencesctivityBinding::inflate
    override val modelClass: Class<BaseViewModel>
        get() = BaseViewModel::class.java

    override fun initData() {
    }

    override fun initView() {
    }

    private fun m(){
        getSharedPreferences("text.sp",Context.MODE_PRIVATE)
        getPreferences(Context.MODE_PRIVATE)
        PreferenceManager.getDefaultSharedPreferences(this)
    }

    companion object {
        fun start(context: Context) {
            Intent(context,SharedPreferencesActivity::class.java).also {
                context.startActivity(it)
            }
        }
    }
}